<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
        body, html,#allmap
        {width: 100%;
            height: 100%;
            overflow: hidden;
            margin:0;font-family:"微软雅黑";
        }
        #allmap{
            width: 80%;
            height: 80%;
        }

    </style>
    <script type="text/javascript" src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=BuSSBrZq8RmIndOoEZfcCWmVu8t72Qjn"></script>
    <title>设置地图3D视角</title>
</head>
<body>
<div id="allmap"></div>

</body>
</html>
<script type="text/javascript">
    // 按住鼠标右键，修改倾斜角和角度
    var map = new BMapGL.Map("allmap");    // 创建Map实例

    //这是我的家乡==丁陂乡
    map.centerAndZoom(new BMapGL.Point(115.836102,26.250981), 16);  // 初始化地图,设置中心点坐标和地图级别
    //添加地图类型控件
    map.addControl(new BMapGL.MapTypeControl({
        mapTypes:[
            BMAP_NORMAL_MAP,
            BMAP_HYBRID_MAP
        ]
    }));
    // 绘制点
    var marker = new BMapGL.Marker(new BMapGL.Point(115.836102,26.250981), 16);
    map.addOverlay(marker);

    map.setCurrentCity("龙岩市");    //设置地图显示的城市，此项必须设置的
    map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
</script>
